<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>CSS层叠性</title>
    <style>
        div {
            color: red;
            font-size: 12px;
        }
        
        div {
            color: pink;
        }
    </style>
</head>

<body>
    <div>后写的样式会覆盖之前写的样式，此案例中红色被粉色替换了</div>
</body>

</html>